﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="TITLES.aspx.vb" Inherits="PRUEVANET3.Formulario_web17" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="title_id" DataSourceID="SqlDataSource1" 
        EmptyDataText="No hay registros de datos para mostrar." Height="137px">
        <Columns>
            <asp:BoundField DataField="title_id" HeaderText="title_id" ReadOnly="True" 
                SortExpression="title_id" />
            <asp:BoundField DataField="title" HeaderText="title" SortExpression="title" />
            <asp:BoundField DataField="type" HeaderText="type" 
                SortExpression="type" />
            <asp:BoundField DataField="pub_id" HeaderText="pub_id" 
                SortExpression="pub_id" />
            <asp:BoundField DataField="price" HeaderText="price" 
                SortExpression="price" />
            <asp:BoundField DataField="advance" HeaderText="advance" 
                SortExpression="advance" />
            <asp:BoundField DataField="royalty" HeaderText="royalty" 
                SortExpression="royalty" />
            <asp:BoundField DataField="ytd_sales" HeaderText="ytd_sales" 
                SortExpression="ytd_sales" />
            <asp:BoundField DataField="notes" HeaderText="notes" 
                SortExpression="notes" />
            <asp:BoundField DataField="pubdate" HeaderText="pubdate" 
                SortExpression="pubdate" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:pubsConnectionString4 %>" 
        DeleteCommand="DELETE FROM [titles] WHERE [title_id] = @original_title_id AND [title] = @original_title AND [type] = @original_type AND (([pub_id] = @original_pub_id) OR ([pub_id] IS NULL AND @original_pub_id IS NULL)) AND (([price] = @original_price) OR ([price] IS NULL AND @original_price IS NULL)) AND (([advance] = @original_advance) OR ([advance] IS NULL AND @original_advance IS NULL)) AND (([royalty] = @original_royalty) OR ([royalty] IS NULL AND @original_royalty IS NULL)) AND (([ytd_sales] = @original_ytd_sales) OR ([ytd_sales] IS NULL AND @original_ytd_sales IS NULL)) AND (([notes] = @original_notes) OR ([notes] IS NULL AND @original_notes IS NULL)) AND [pubdate] = @original_pubdate" 
        InsertCommand="INSERT INTO [titles] ([title_id], [title], [type], [pub_id], [price], [advance], [royalty], [ytd_sales], [notes], [pubdate]) VALUES (@title_id, @title, @type, @pub_id, @price, @advance, @royalty, @ytd_sales, @notes, @pubdate)" 
        ProviderName="<%$ ConnectionStrings:PUBSConnectionString.ProviderName %>" 
        SelectCommand="SELECT [title_id], [title], [type], [pub_id], [price], [advance], [royalty], [ytd_sales], [notes], [pubdate] FROM [titles]" 
        
    UpdateCommand="UPDATE [titles] SET [title] = @title, [type] = @type, [pub_id] = @pub_id, [price] = @price, [advance] = @advance, [royalty] = @royalty, [ytd_sales] = @ytd_sales, [notes] = @notes, [pubdate] = @pubdate WHERE [title_id] = @original_title_id AND [title] = @original_title AND [type] = @original_type AND (([pub_id] = @original_pub_id) OR ([pub_id] IS NULL AND @original_pub_id IS NULL)) AND (([price] = @original_price) OR ([price] IS NULL AND @original_price IS NULL)) AND (([advance] = @original_advance) OR ([advance] IS NULL AND @original_advance IS NULL)) AND (([royalty] = @original_royalty) OR ([royalty] IS NULL AND @original_royalty IS NULL)) AND (([ytd_sales] = @original_ytd_sales) OR ([ytd_sales] IS NULL AND @original_ytd_sales IS NULL)) AND (([notes] = @original_notes) OR ([notes] IS NULL AND @original_notes IS NULL)) AND [pubdate] = @original_pubdate" 
    ConflictDetection="CompareAllValues" 
    OldValuesParameterFormatString="original_{0}">
        <DeleteParameters>
            <asp:Parameter Name="original_title_id" Type="String" />
            <asp:Parameter Name="original_title" Type="String" />
            <asp:Parameter Name="original_type" Type="String" />
            <asp:Parameter Name="original_pub_id" Type="String" />
            <asp:Parameter Name="original_price" Type="Decimal" />
            <asp:Parameter Name="original_advance" Type="Decimal" />
            <asp:Parameter Name="original_royalty" Type="Int32" />
            <asp:Parameter Name="original_ytd_sales" Type="Int32" />
            <asp:Parameter Name="original_notes" Type="String" />
            <asp:Parameter Name="original_pubdate" Type="DateTime" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="title_id" Type="String" />
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="type" Type="String" />
            <asp:Parameter Name="pub_id" Type="String" />
            <asp:Parameter Name="price" Type="Decimal" />
            <asp:Parameter Name="advance" Type="Decimal" />
            <asp:Parameter Name="royalty" Type="Int32" />
            <asp:Parameter Name="ytd_sales" Type="Int32" />
            <asp:Parameter Name="notes" Type="String" />
            <asp:Parameter Name="pubdate" Type="DateTime" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="type" Type="String" />
            <asp:Parameter Name="pub_id" Type="String" />
            <asp:Parameter Name="price" Type="Decimal" />
            <asp:Parameter Name="advance" Type="Decimal" />
            <asp:Parameter Name="royalty" Type="Int32" />
            <asp:Parameter Name="ytd_sales" Type="Int32" />
            <asp:Parameter Name="notes" Type="String" />
            <asp:Parameter Name="pubdate" Type="DateTime" />
            <asp:Parameter Name="original_title_id" Type="String" />
            <asp:Parameter Name="original_title" Type="String" />
            <asp:Parameter Name="original_type" Type="String" />
            <asp:Parameter Name="original_pub_id" Type="String" />
            <asp:Parameter Name="original_price" Type="Decimal" />
            <asp:Parameter Name="original_advance" Type="Decimal" />
            <asp:Parameter Name="original_royalty" Type="Int32" />
            <asp:Parameter Name="original_ytd_sales" Type="Int32" />
            <asp:Parameter Name="original_notes" Type="String" />
            <asp:Parameter Name="original_pubdate" Type="DateTime" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
